<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditClientTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditClientLabel_id}" for="id" />
                    <h:inputText id="id" value="#{ClientBean.selected.id}" title="#{bundle.EditClientTitle_id}" required="true" requiredMessage="#{bundle.EditClientRequiredMessage_id}"/>
                    <h:outputLabel value="#{bundle.EditClientLabel_nom}" for="nom" />
                    <h:inputText id="nom" value="#{ClientBean.selected.nom}" title="#{bundle.EditClientTitle_nom}" />
                    <h:outputLabel value="#{bundle.EditClientLabel_prenom}" for="prenom" />
                    <h:inputText id="prenom" value="#{ClientBean.selected.prenom}" title="#{bundle.EditClientTitle_prenom}" />
                    <h:outputLabel value="#{bundle.EditClientLabel_dateNaiss}" for="dateNaiss" />
                    <h:inputText id="dateNaiss" value="#{ClientBean.selected.dateNaiss}" title="#{bundle.EditClientTitle_dateNaiss}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditClientLabel_sexe}" for="sexe" />
                    <h:inputText id="sexe" value="#{ClientBean.selected.sexe}" title="#{bundle.EditClientTitle_sexe}" required="true" requiredMessage="#{bundle.EditClientRequiredMessage_sexe}"/>
                    <h:outputLabel value="#{bundle.EditClientLabel_dateAjout}" for="dateAjout" />
                    <h:inputText id="dateAjout" value="#{ClientBean.selected.dateAjout}" title="#{bundle.EditClientTitle_dateAjout}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditClientLabel_dateModi}" for="dateModi" />
                    <h:inputText id="dateModi" value="#{ClientBean.selected.dateModi}" title="#{bundle.EditClientTitle_dateModi}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditClientLabel_compte}" for="compte" />
                    <h:selectOneMenu id="compte" value="#{ClientBean.selected.compte}" title="#{bundle.EditClientTitle_compte}" >
                        <f:selectItems value="#{compteController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{ClientBean.update}" value="#{bundle.EditClientSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditClientViewLink}"/>
                <br />
                <h:commandLink action="#{ClientBean.prepareList}" value="#{bundle.EditClientShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditClientIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
